package com.bby.common.model;

import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@Accessors(chain = true)
@ToString
public class UserPublicInfo {
    public String userId;
    public String username;
    public String signature;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    public Date birthday;
    public String sex;

    public UserPublicInfo() {
    }

    public UserPublicInfo(UserCustomInfo customInfo) {
        username=customInfo.getUsername();
        userId=customInfo.getUserId();
        signature=customInfo.getSignature();
        birthday=customInfo.getBirthday();
        sex=customInfo.getSex();
    }
}
